<template>
  <div>
    <div class="q">
        <img :src="src">
        <p>这是一个小狗</p>
    </div>
  </div>
</template>

<script>
export default {
    data () {
        return {
            src:'https://img0.baidu.com/it/u=1195778458,70026656&fm=253&fmt=auto&app=138&f=JPEG?w=480&h=720'
        }
    }
}
</script>   

<style>
    .q {
        width: 200px;
        height: 200px;
        text-align: center; 
        border: 1px solid #333;
        float: left;       
    }
    .q img {
        width: 100%;
        height: 100%;
    }
    
</style>